setClass("HierParamClusterAlg",contains="VParamClusterAlg",
		representation(
				.method="character"
		),
		prototype=prototype(
				.description="Hierarchical parametric Clustering algorithm class",
				.method="ward"
		
		)
) 

#methods
#initialization method 
setMethod("initialize",
		signature="HierParamClusterAlg",
		function(.Object,clusterNum,method="ward",...){
			.Object <-callNextMethod(.Object,clusterNum,...)
			.Object@.method <-method

			return(.Object)
		})


setMethod("clusterize",
		signature="HierParamClusterAlg",
		definition=function(.Object,inputSet,...){
			callNextMethod(.Object,inputSet,...)
			
			clObject <- hclust(dist(inputSet$X),method=.Object@.method)
			clusters <- as.numeric(cutree(clObject,k=.Object@.clusterNum))
			return(clusters)
		}
)


